package com.hjm.project.ShopOrderRecord.ShopOrderRecord.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.ShopOrderRecord.ShopOrderRecord.mapper.ShopOrderRecordMapper;
import com.hjm.project.ShopOrderRecord.ShopOrderRecord.domain.ShopOrderRecord;
import com.hjm.project.ShopOrderRecord.ShopOrderRecord.service.IShopOrderRecordService;
import com.hjm.common.utils.text.Convert;

/**
 * 订单状态记录Service业务层处理
 * 
 * @author ShopOrderRecord
 * @date 2020-11-30
 */
@Service
public class ShopOrderRecordServiceImpl implements IShopOrderRecordService 
{
    @Autowired
    private ShopOrderRecordMapper shopOrderRecordMapper;

    /**
     * 查询订单状态记录
     * 
     * @param updateDate 订单状态记录ID
     * @return 订单状态记录
     */
    @Override
    public ShopOrderRecord selectShopOrderRecordById(String updateDate)
    {
        return shopOrderRecordMapper.selectShopOrderRecordById(updateDate);
    }

    /**
     * 查询订单状态记录列表
     * 
     * @param shopOrderRecord 订单状态记录
     * @return 订单状态记录
     */
    @Override
    public List<ShopOrderRecord> selectShopOrderRecordList(ShopOrderRecord shopOrderRecord)
    {
        return shopOrderRecordMapper.selectShopOrderRecordList(shopOrderRecord);
    }

    /**
     * 新增订单状态记录
     * 
     * @param shopOrderRecord 订单状态记录
     * @return 结果
     */
    @Override
    public int insertShopOrderRecord(ShopOrderRecord shopOrderRecord)
    {
        return shopOrderRecordMapper.insertShopOrderRecord(shopOrderRecord);
    }

    /**
     * 修改订单状态记录
     * 
     * @param shopOrderRecord 订单状态记录
     * @return 结果
     */
    @Override
    public int updateShopOrderRecord(ShopOrderRecord shopOrderRecord)
    {
        return shopOrderRecordMapper.updateShopOrderRecord(shopOrderRecord);
    }

    /**
     * 删除订单状态记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteShopOrderRecordByIds(String ids)
    {
        return shopOrderRecordMapper.deleteShopOrderRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单状态记录信息
     * 
     * @param updateDate 订单状态记录ID
     * @return 结果
     */
    @Override
    public int deleteShopOrderRecordById(String updateDate)
    {
        return shopOrderRecordMapper.deleteShopOrderRecordById(updateDate);
    }
}
